<template>
  <basic-container class="noScrollBar tabMain-wrap">
    <common-template
      ref="detailRef"
      :detailOptions="detailOptions"
      :isPlanManager="isPlanManager"
    ></common-template>
  </basic-container>
</template>

<script>
import commonTemplate from "./yqybPlanTemplate";
import {
    getDeviceList,
} from "@/api/sxdky/sxdky";
export default {
  data() {
    return {
      isPlanManager:0,
      detailOptions: {
        label: "仪器设备管理",
        name: "checkPlanList",
        options: {
          height: "calc(100vh - 425px)",
          addBtn: false,
          menuDelBtn: false,
          menuUpBtn: false,
          menuDownBtn: true,
          dialogDirection: "ltr",
          dialogType: "drawer",
          calcHeight: 30,
          tip: false,
          searchShow: true,
          searchMenuSpan: 6,
          border: true,
          index: true,
          indexLabel: "序号",
          viewBtn: true,
          selection: true,
          excelBtn: false,
          dialogClickModal: false,
          menuOtherBtn: true,
          gistBtn: false,
          align: "center",
          menuAlign: "center",
          searchIcon: true,
          searchIndex: 3,
          labelWidth: 120,
          editBtn: false,
          delBtn: false,
          column: [
            {
                label: "设备名称",
                prop: "deviceName",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
                rules: [
                    {
                        required: true,
                        message: "请输入设备名称",
                        trigger: "click",
                    },
                ],
            },
            {
                label: "设备型号",
                prop: "deviceType",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: true,
                rules: [
                    {
                        required: true,
                        message: "请输入设备型号",
                        trigger: "click",
                    },
                ],
            },
            {
                label: "出厂编号",
                prop: "serialNum",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: false,
            },
            {
                label: "检验周期(年)",
                prop: "testPeriod",
                type: "number",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                sortable: true,
                search: false,
                controlsPosition: "top",
            },
            {
                label: "有效期至",
                prop: "validTime",
                type: "date",
                sortable: true,
                search: false,
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                format: "yyyy-MM-dd",
                valueFormat: "yyyy-MM-dd",
            },
            {
                label: "计划送检时间",
                prop: "planTestTime",
                type: "date",
                sortable: true,
                search: false,
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                format: "yyyy-MM-dd",
                valueFormat: "yyyy-MM-dd",
                rules: [
                    {
                        required: true,
                        message: "请输入计划送检时间",
                        trigger: "click",
                    },
                ],
            },
            {
                label: "上次检验费用",
                prop: "lastTestCost",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: false,
            },
            {
                label: "计划费用",
                prop: "testCost",
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                search: false,
                rules: [
                    {
                        required: true,
                        message: "请输入本次费用",
                        trigger: "click",
                    },
                ],
            },
            {
              label: "项目所属中心",
              prop: "dept",
              search: false,
              editDisplay: true,
              viewDisplay: true,
              overHidden: true,
              rules: [
                {
                  required: true,
                  message: "请输入项目所属中心",
                  trigger: "click",
                },
              ],
            },
            {
                label: "项目所属部门",
                prop: "department",
                search: false,
                editDisplay: true,
                viewDisplay: true,
                overHidden: true,
                rules: [
                    {
                        required: true,
                        message: "请输入项目所属部门",
                        trigger: "click",
                    },
                ],
            },
            {
                label: "检定类别",
                prop: "testType",
                type: "select",
                search: true,
                editDisplay: true,
                viewDisplay: true,
                rules: [
                    {
                        required: true,
                        message: "请选择检定类别",
                        trigger: "click",
                    },
                ],
                dicData: [
                    {
                        label: "A",
                        value: "A",
                    },
                    {
                        label: "B",
                        value: "B",
                    },
                    {
                        label: "C",
                        value: "C",
                    },
                    {
                        label: "D",
                        value: "D",
                    },
                ],
            }
          ],
        },
        url: {
          getList: getDeviceList,
        },
      },
    };
  },
  components: {
      commonTemplate,
  },
  computed: {},

  methods: {

  },

};
</script>

<style lang='scss'>
.tabMain-wrap {
  // height: calc(100vh - 400px);
  overflow: hidden auto;
}
</style>
